# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-unf_ext
_gemname=unf_ext
pkgver=0.0.8
pkgrel=7
pkgdesc='Unicode Normalization Form support library for CRuby.'
arch=('any')
url='https://github.com/knu/ruby-unf_ext'
license=('MIT')
depends=('ruby')
makedepends=('rubygems' 'ruby-rdoc')
source=("https://rubygems.org/gems/$_gemname-$pkgver.gem")
noextract=("$_gemname-$pkgver.gem")
sha512sums=('f0c1e7273aa1b74c81a8b6f108171cbee5479c3f5c256ea3eba3797cf2f5db0c346a33a524fa40bcdea02a75be60fcd470f0a17231cb7b103d28763dd0f8b56f')

package() {
  _gemdir="$(ruby -e 'puts Gem.default_dir')"

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -i "$pkgdir$_gemdir" "$_gemname-$pkgver.gem"
  else
    gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
      "$_gemname-$pkgver.gem"
  fi
}

